package net.neptech.enums.workflow;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum InstanceNodeRecordStatusEnum {
    PENDING(0,"未开始"),
    ON_GOING(1,"进行中"),
    ENDED(2,"已结束"),
    CANCELED(3,"已撤销"),
    ;
    private int code;
    private String name;
    public static InstanceNodeRecordStatusEnum get(int code){
        return Arrays.stream(InstanceNodeRecordStatusEnum.values()).filter(w->w.getCode()==code).findAny().orElse(null);
    }
}
